package com.six.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.six.core.entity.Area;
import com.six.core.entity.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @author:LiWei
 * @date:2023年02月28日9:10
 */
@Mapper
public interface AreaMapper extends BaseMapper<Area> {

    @Select("select e.* from acl_emp e left join acl_area a on a.empid=e.id where a.empid is null")
    List<Emp> findAllEmp();

    @Select(" select * from acl_emp e left join acl_area a on e.id=a.empid where a.id=#{id}")
    List<Map> findEmp(Integer id);
}
